export const validateUsername = (rule, value, callback) => {
  if (value.length < 2 || value.length > 12) {
    callback(new Error("账号长度在2到12个字符"));
  } else {
    callback();
  }
};
export const validatePassword = (rule, value, callback) => {
  const reg1 = /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{6,18}/;
  if (value == null || value == "") {
    callback(new Error("请输入密码"));
  } else if (!reg1.test(value)) {
    callback(new Error("密码应为6-18位字母与数字组合"));
  } else {
    callback();
  }
};
